Re: [GENERAL] pg_database corrupted(?) If so, what do I do???? - Mailing list pgsql-general

From Herouth Maoz
Subject Re: [GENERAL] pg_database corrupted(?) If so, what do I do????
Date
Msg-id l03130304b35dfdfa6c46@[147.233.159.109]
Whole thread Raw
In response to Re: [GENERAL] pg_database corrupted(?) If so, what do I do????  ("Jonny Hinojosa" <Jonny@TCA.net>)
List pgsql-general
At 18:03 +0300 on 11/05/1999, Jonny Hinojosa wrote:


> No, but I have tried to figure out how to do just that.  I have found no way
> to effect these updates.  So which part of the docs did I sleep through???
>
> All help is GREATLY appreciated.

I can't test any advice I give on my own system, as it is used for
production. But let's see if we can do something.

If you tried to update the pg_database with UPDATE pg_database SET
datpath=datname WHERE datpath <> datname; and it didn't work, you may try
the following:

make a copy of the hom and cdmwhere directories in the data directory, for
backup.

Try to DROP DATABASE on the above databases. See if they have disappeared
from the database list (you can use select * from pg_database instead of
psql -l if you are already in psql). If they did, remove or rename the hom
and cdmwhere directories, and re-create them, using the user.

You are now supposed to have two new empty databases with the old names.
Remove the newly created directories and rename the old ones back. Check to
see if you can connect.

It may be advisable to shut down the postmaster when you are changing
things in the data directory, and restart it for the next psql session.

Now, supposed the DROP DATABASE didn't work, and complains that it doesn't
find the directories. Then, if it were me, I would create copies of the
original hom and cdmwhere directories, but give them the names that appear
in the pg_database table (check to see if there are extra spaces there,
though). You can give names that contain spaces in unix, it's no problem.
And then I'd try the drop again.

I hope any of these suggestions helps. Just make sure you have a backup
copy of the directories somewhere safe.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



pgsql-general by date:

Previous
From: "Jonny Hinojosa"
Date:
Subject: Re: [GENERAL] pg_database corrupted(?) If so, what do I do????
Next
From: "Jonny Hinojosa"
Date:
Subject: Re: [GENERAL] pg_database corrupted(?) If so, what do I do????